package org.dreamwork.jasmine2.ajax;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 2010-12-10
 * Time: 0:26:31
 */
public enum RequestMethod {
    GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT;
    public static RequestMethod parse (String text) {
        for (RequestMethod m : values ()) {
            if (m.toString ().equalsIgnoreCase (text))
                return m;
        }
        throw new IllegalArgumentException ("Can't cast " + text + " to RequestMethod");
    }
}